package msgs;
import java.io.*;
/**
 * Generic Admin msg -- used for inheritance, and for initial login
 * Team 9: Andrew Hayworth, Brian Parrella, Ryan Kortmann, Nina Papa
 * @author Andrew Hayworth
 *
 */

public class AdminMsg implements TTConstants, Serializable {
	private AdminActions action;
	private Responses response;
	private String ip, name, pwd;
	private byte[] adminKey;
	
	public AdminMsg(String ip, String name, String pwd) {
		this.ip = ip;
		this.name = name;
		this.pwd = pwd;
	}
	public AdminMsg(String ip, String name, String pwd, byte[] key) {
		this(ip, name, pwd);
		this.adminKey = key;
	}
	
	public AdminMsg(ConnectedUser c, TTConstants.AdminActions a) {
		this(c.getIp(), c.getName(), c.getPwd(), c.getClientKey());
		this.action = a;
	}
	
	public AdminActions getAction() { return action; }
	public void setAction(AdminActions action) {
		this.action = action;
	}
	
	public Responses getResponse() { return response; }
	public void setResponse(Responses response) {
		this.response = response;
	}
	
	public String getIP() { return ip; }
	public void setIP(String ip) { this.ip = ip; }
	
	public String getName() { return name; }
	public void setName(String n) { name = n; }
	
	public String getPwd() { return pwd; }
	public void setPwd(String p) { pwd = p; }
	
	public byte[] getAdminKey() { return adminKey; }
	public void setAdminKey(byte[] k) { adminKey = k; }
}
